package com.example.controller;

import com.example.entity.RecommendGoods;
import com.example.service.RecommendGoodsService;
import com.example.vo.IndexRecommendVo;
import com.example.vo.Result;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@Slf4j
public class RecommendController {
    @Autowired
    private RecommendGoodsService recommendGoodsService;

    @Operation(summary = "获取首页展示商品列表")
    @GetMapping("buyer/recommend/common/getIndexRecommend")
    public Result<IndexRecommendVo> getIndexRecommendGoods(){
        IndexRecommendVo vo = recommendGoodsService.getIndexRecommendGoods();
        return Result.ok(vo);
    }
}